package com.cisco.pso;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;

public class DiffReader {

	private List<DiffResult> results = new ArrayList<DiffResult>();

	public DiffReader(Reader reader,   String leftFolder,String rightFolder) {
		BufferedReader br = new BufferedReader(reader);

		while (true) {

			try {
				String line = br.readLine();
				if (line == null || line.trim().isEmpty())
					break;

				DiffResult result=null;
				 
				result =new DiffResult(line , leftFolder, rightFolder);
				
				 
				results.add(result);
			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

	}
	
	public List<DiffResult> getResults() {
		return results;
	}

	public void setResults(List<DiffResult> results) {
		this.results = results;
	}

}
